<template>
	<view class="cpnContent df">
		<view class="buttonItem" @click="addCity">添加</view>
		<view class="buttonItem" @click="cancelPreview">取消</view>
	</view>
</template>

<script setup lang="ts">
	// 定义要触发的事件类型
	const emit = defineEmits(['addCity', 'cancelPreview']);
	const addCity = () => {
		emit('addCity'); // 触发 addCity 事件
	}
	const cancelPreview = () => {
		emit('cancelPreview'); // 触发 cancelPreview 事件
	}
</script>

<style scoped lang="scss">
	.cpnContent {
		width: 100%;
		padding: 24rpx;
		align-items: center;
		justify-content: space-between;
		box-sizing: border-box;

		.buttonItem {
			border-radius: 50rpx;
			padding: 20rpx 50rpx;
			font-size: 32rpx;
			color: white;
			background-color: rgba(0, 0, 0, 0.5);
		}
	}
</style>